<form name="frm_local" action="<?php echo $this->action; ?>" method="post" OnSubmit="return checkdados(this)">
 <input type="hidden" name="id" id="id" value="<?php echo $this->local->id_local;?>" />
  <table>
    <tr>
      <td>Nome local:</td>
      <td colspan="3"><input name="local" type="text" id="local" size="40" value="<?php echo $this->local->ds_local; ?>"/><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
	<tr>
    <td>País:</td>
    <td colspan="3"><select name="pais" id="pais" onChange="if (this.options[this.selectedIndex].value){selecionaEstados(this.options[this.selectedIndex].value)}">
      <?php echo UtilController::getOptionPais($this->local->id_pais, 0);?>
    </select><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
    <tr>
      <td>Estado/Província</td>
      <td colspan="3"><select  name="estado" id="estado" onChange="if (this.options[this.selectedIndex].value){selecionaCidades(this.options[this.selectedIndex].value)}">
        <?php echo UtilController::getOptionEstadoPorPais($this->local->id_pais, $this->local->id_estado, 0); ?>
      </select><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
    <tr>
      <td>Cidade</td>
      <td colspan="3"><select name="cidade" id="cidade">
        <?php echo UtilController::getOptionCidadePorEstado($this->local->id_estado, $this->local->id_cidade); ?>
      </select><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
    <tr>
     <td>CEP:</td>
      <td ><input name="caixaPostal" type="text" id="caixaPostal" onkeypress="return formata_keypress(this, '99999-999', (event ? event : Event))" value="<?php echo $this->local->ds_caixa_postal; ?>" size="18" maxlength="10"/><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
    <tr>
      <td>Endereço:</td>
      <td colspan="3"><input name="endereco" type="text" id="endereco" size="40" value="<?php echo $this->local->ds_endereco; ?>" /><?php echo UtilController::campoObrigatorio()?></td>
      </tr>
    <tr>
      <td>Número:</td>
      <td><input name="numEnd" type="text" id="numEnd" size="10" value="<?php echo $this->local->ds_numero; ?>"/><?php echo UtilController::campoObrigatorio()?></td>
      </tr>
    <tr>
      <td>Complemento:</td>
      <td> <input type="text" name="complemento" id="complemento" value="<?php echo $this->local->ds_complemento; ?>" /></td>
    </tr>
    <tr>
      <td>Bairro:</td>
      <td><input type="text" name="bairro" id="bairro" value="<?php echo $this->local->ds_bairro; ?>"/><?php echo UtilController::campoObrigatorio()?></td>
    </tr>
    <tr>
      <td colspan="4" align="right"><input type="submit" name="save" id="save" value="<?php echo $this->buttonText; ?>" /></td>
    </tr>
  </table>
</form>